<template>
  <div>Login：{{ useCounter.count }} -- {{ useCounter.doubleCount }}</div>
  <div>
    <button @click="useCounter.increment">点我数字加1</button>
    <button @click="useCounter.decrement">点我数字减1</button>
    <button @click="goHome">去登陆</button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useCounterStore } from '@/stores/modules/counter'
import { getUserInfo } from '@/api/system/user'

const userInfo = await getUserInfo()
console.log(userInfo)

const router = useRouter()
const useCounter = useCounterStore()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped></style>
